#ifndef LAUNCHER_H
#define LAUNCHER_H

#include <QMainWindow>
#include <QtNetwork>
#include <QRegularExpression>
#include <QDomDocument>
#include <QTextStream>
#include <QThreadPool>
#include <QScriptEngine>
#include <QIODevice>
#include <QFile>
#include <QDebug>
#include <QScriptValue>
#include <QHostInfo>
#include <QHostAddress>
#include <QNetworkInterface>
#include <QNetworkProxy>
#include <QVector>

#include "ProxyPac.h"
#include "anime.h"
#include "animetask.h"
#include "guiol.h"

using namespace std;

namespace Ui {
class Launcher;
}

class Launcher : public QMainWindow
{
    Q_OBJECT
    
public:
    explicit Launcher(QWidget *parent = 0);
    void recupListe();
    void recupAnime(QString url);
    ~Launcher();
    
private:
    Ui::Launcher *ui;
    GuiOL* affichage;
    QNetworkReply *reponse;
    QRegularExpression *parsing_liste;
    QRegularExpression *parsing_anime;
    QRegularExpression *parsing_anime_infos;
    QRegularExpression *parsing_episodes;
    QRegularExpression *parsing_bonus;
    QNetworkProxy proxy;
    QString proxy_address;

signals :
    void afficherTexteLauncher(QString);
    void ajouterAnimeOl(Anime *);
public slots:
    void LancerOL();
};

#endif // LAUNCHER_H
